package jsyf.oa.entity.system;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by Lenovo on 2017/12/8.
 */
@Entity
@Table(name = "T_SYS_PROVINCE", schema = "oa", catalog = "")
public class ProvinceEntity extends BaseEntity {
    private String name;
    private String parentId;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject json = new JSONObject();
        json.put("ID",this.getId());
        json.put("NAME",this.getName());
        json.put("PARENT_ID",this.getParentId());
        return json;
    }

    @Override
    public String getTableName() {
        return "T_SYS_PROVINCE";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject json = new JSONObject();
        json.put("ID","id");
        json.put("NAME","name");
        json.put("PARENT_ID","parentId");
        return json;
    }
}
